﻿using DFGK_WMS.Model.DTO;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.IRepository
{
    /// <summary>
    /// 收获管理
    /// </summary>
    public interface ITReceivingBillRepository: IBaseRepository<TReceivingBill>
    {

        /// <summary>
        /// 逻辑分区
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        List<TDictItem> GetDictItems();

        /// <summary>
        /// 收获管理显示
        /// </summary>
        /// <param name="supplierId"></param>
        /// <param name="status"></param>
        /// <param name="warehouseId"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<TReceivingBill> GetReceivingBillList(int supplierId,int? status,int warehouseId,int pageIndex,int pageSize,out int totalCount);

        /// <summary>
        /// 添加收货
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool AddReceivingBill(TReceivingBill m,out string message);

        /// <summary>
        /// 删除收货单
        /// </summary>
        /// <param name="rid"></param>
        /// <returns></returns>
        bool DelReceivingBill(int rid, out string message);

        /// <summary>
        /// 根据Id获取对象
        /// </summary>
        /// <param name="rid"></param>
        /// <returns></returns>
        TReceivingBill GetTReceivingBillById(int rid);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UpdReceivingBill(TReceivingBill m, out string message);

        /// <summary>
        /// 根据物料分类返回物料
        /// </summary>
        /// <param name="mid"></param>
        /// <returns></returns>
        List<TMaterial> GetRidById(int mid);

        /// <summary>
        /// 收货入库
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool AddReceivingOrderDateil(ReceivingBillOrderDto m ,out string message);

        /// <summary>
        /// PAD收货入库
        /// </summary>
        bool AddPDAReceivingOrderDateil(ReceivingBillOrderDto m,out string message, ref List<TCell> Getcell);

        /// <summary>
        /// 强制完成
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool ReceivingBillComplete(int id);

        /// <summary>
        /// 修改收货单状态
        /// </summary>
        /// <param name="rid"></param>
        /// <returns></returns>
        bool UpdReceivingBillStatus(int rid);
    }
}
